feat: choose how see-through a colour is, beside the colour - #108
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The colour picker takes a transparency beside the colour, which is the half of the reference's colour dialog Sublore did not have. It is a number from 0 to 255, and ASS counts transparency and not opacity, so 0 is solid and 255 is invisible: the field says the word rather than leaving the direction to be guessed. An empty field writes none at all, which is this product's answer to the reference writing the alpha only when it changed.
The colour and its transparency go in as one undo step, on the planner the font picker brought in a moment ago. That planner is now the only way an override tag is written with a value the caller chose, so the single-tag path it replaced is gone rather than left standing:
Edit::SetOverrideTag,plan_set_override_tag,subtitle_set_override_tagand the hook method are all removed, and the tests that covered them now send a list of one, which is what the pickers send when nothing goes beside the colour.Changes
\1ato\4atags, and the pick that writes the pair as one step.setOverrideTagremoved.subtitle_set_override_tagand its payload removed.Edit::SetOverrideTagand its planner removed; the list edit is the one way in.How to verify it by using the app
fixtures/subtitles/ass/clean/speakers.ass, click a row and put the caret at the start of the text box.#12AB34into the colour and128into Clear, then press Enter. The line begins{\c&H34AB12&\1a&H80&}: the colour with blue first, and 128 written as hexadecimal 80.300into Clear and press Enter. Nothing is written and the field is marked, because a transparency runs from 0 to 255.Verified on Linux: full gate green step by step, and the battery green at 35 spec files of 35 with 292 checks. One mutation, a transparency written in decimal instead of hexadecimal, reddened this check first.